﻿using System;
using Framework;

namespace Enterprise.Admin.Handle
{
    /// <summary>
    /// 修改企业荣誉
    /// </summary>
    public partial class EditHonor : AdminBasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            object result;
            try
            {
                var id = Fq("CoHonorId").SafeToInt();
                var name = Fq("CoName").SafeToString();
                var nameEn = Fq("CoNameEn").SafeToString();
                var description = Fq("CoDescription").SafeToString();
                var descriptionEn = Fq("CoDescriptionEn").SafeToString();
                var normalImage = Fq("CoNormalImage").SafeToString();
                var smallImage = Fq("CoSmallImage").SafeToString();
                var bigImage = Fq("CoBigImage").SafeToString();
                var sorts = Fq("CoSort").SafeToInt();
                var honorService = new HonorService();
                honorService.Eidt(id, name, nameEn, description, descriptionEn, smallImage, normalImage, bigImage,sorts);
                result = new { state = true, message = "修改成功" };
            }
            catch (Exception ex)
            {
                result = (new { state = false, message = ex.Message });
            }
            Json(result);
        }
    }
}